package com.shuai.starter.annotation;

import com.shuai.starter.bootstrap.RpcConsumerBootstrap;
import com.shuai.starter.bootstrap.RpcInitBootstrap;
import com.shuai.starter.bootstrap.RpcProviderBootstrap;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author bxs
 * @version 1.0
 * @Date 2024/7/30
 * 启动rpc框架的注解
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import({RpcInitBootstrap.class, RpcProviderBootstrap.class, RpcConsumerBootstrap.class})
public @interface EnableXSRpc {
    /**
     * 是否启用RPC框架
     */
    boolean startRpcServer() default true;
}
